home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PD Collection CD 1
/
PD Collection CD 1.iso
/
programer2
/
euclidlib
/
h
/
edraw
< prev
next >
Wrap
Text File
|
1992-04-19
|
3KB
|
82 lines
/**** edraw.h ****/
/* Interface to 'eudlid_draw'. */
/* By Paul Field
* See !ReadMe file for distribution/modification restrictions
*
* Stack checking is disabled for this module so that calls to it
* will not move flex blocks.
*
* The idea of this module is to :
* i) provide a friendlier interface to euclid_draw
* ii) add extra functionality to euclid_draw
*
* Any suggestions are welcome.
*
*/
#ifndef __edraw_h
#define __edraw_h
#include "euclid.h"
#include "os.h"
typedef struct edraw_splitinfostr edraw_splitinfo;
typedef struct edraw_info
{ euclid_drawstyle style; /* Do not use any timeout codes */
euclid_header *structure;
int xoffset;
int yoffset;
const char *camera; /* NULL = no camera */
void *vduvars; /* NULL = current vdu vars */
unsigned int timeout; /* timeout in centiseconds (0 = none) */
/* Variables filled in by draw routines */
/* You should treat these as 'read-only' - the routines */
/* will initialise and change them as is needed. */
BOOL timedout; /* Initialised to FALSE */
euclid_drawinfo *infoblock;
edraw_splitinfo *splitinfo; /* Initialised as NULL */
}edraw_info;
void edraw_initialise(edraw_info *info);
/* Call this to initialise a new 'info' block.
*/
os_error *edraw_draw(edraw_info *info);
/* Basically the same functionality as euclid_draw except
* i) the timeout comes from 'info->timout' rather than the style
* (although in this call timeout of >254 will be treated as 254)
* ii) if 'info->timedout' is TRUE the routine will assume you are continuing
* a timedout picture
* iii) if you are not using timeouts 'info->timedout' will be set to FALSE.
* iv) if there is an error 'info->timeout' will be set to FALSE.
*
* Basically this means that to draw a picture with timeouts you should
* keep calling 'edraw_draw' with the same info block until 'info->timeout'
* is FALSE. To stop the drawing prematurely call 'edraw_stop'.
*/
void edraw_stop(edraw_info *info);
/* Call this routine only if you want to finish drawing a picture that has
* timedout. You should not call this after an error is returned from
* edraw_draw or edraw_split (these are sorted out for you).
* It will set 'info->timedout' to FALSE and throw away the 'splitinfo'
* block (if there was any).
*/
os_error *edraw_split(edraw_info *info);
/* If there is not enough memory for euclid_draw to draw a picture it returns an error.
* This routine performs a euclid_draw but if it runs out of memory it splits the
* picture into smaller sections and then tries again.
* Timeouts that are greater than 254 are dealt with but euclid is a bit erratic
* in its checking of timeouts. You should set info->timeout to about half the
* time that you are repared to wait.
* As with 'edraw_draw', to draw a picture with timeouts just repeatedly call
* this routine until 'info->timeout' is FALSE. To stop the drawing prematurely
* call 'edraw_stop'.
* Currently, the graphics window may be corrupted by this call.
*/
#endif